package io;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class CopyDemo03 {
    public static void main(String[] args) throws IOException {

        FileReader fr = new FileReader("b.txt");
        FileWriter fw = new FileWriter("d.txt");
         int line;
        long start = System.currentTimeMillis();
        while ((line=fr.read())!=-1){
            fw.write(line);
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start);
        fw.close();
        fr.close();

    }
}
